package cn.jarlen.android.plugin

class VerBuilderFactory {

    static VerBuilder builder(projectRootDir) {
        def verBuilder
        if (VerUtils.checkGitProject()) {
            verBuilder = new GitVerBuilder()
        } else if (VerUtils.checkSVNProject(projectRootDir)) {
            verBuilder = new SvnVerBuilder()
        } else {
            verBuilder = new DefaultVerBuilder()
        }
        println("> ApkPgVerPlugin --->this is a " + verBuilder.getRepManager() + " project")
        return verBuilder
    }
}